package com.nengchuan.kbms.dfs.entity.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * <p>
 * 标签属性DTO
 * </p>
 *
 * @author abe
 * @since 2020-04-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "DataTagAttrDTO对象", description = "标签属性DTO")
public class DataTagAttrDTO {

    @ApiModelProperty(value = "主键", position = 10)
    private Long id;

    @NotNull(message = "元数据类型id不能为空")
    @Size(max = 64,message = "元数据类型id长度不能大于64个字符")
    @ApiModelProperty(value = "元数据类型id", position = 20)
    private Long tagId;

    @NotEmpty(message = "属性编号不能为空")
    @Size(max = 40,message = "属性编号长度不能大于40个字符")
    @ApiModelProperty(value = "属性编号", position = 30)
    private String attrNo;

    @NotEmpty(message = "属性名称不能为空")
    @Size(max = 40,message = "属性名称长度不能大于40个字符")
    @ApiModelProperty(value = "属性名称", position = 40)
    private String attrName;

    @NotEmpty(message = "属性类型不能为空")
    @Size(max = 1,message = "属性类型长度不能大于1个字符")
    @ApiModelProperty(value = "属性类型（1:单选框，2:多选框，3:文本输入，4:文本域）", position = 50)
    private String attrType;

    @Size(max = 255,message = "属性默认值长度不能大于255个字符")
    @ApiModelProperty(value = "属性默认值", position = 60)
    private String attrValue;

    @ApiModelProperty(value = "是否必填（0：否；1：是）", position = 70)
    private String requireFlag;

    @Size(max = 2000,message = "属性默认值长度不能大于2000个字符")
    @ApiModelProperty(value = "属性备注", position = 80)
    private String remark;

    @ApiModelProperty(value = "排序", hidden = true)
    @JsonIgnore
    private Integer sortNo;

    @ApiModelProperty(value = "属性值选项", position = 90)
    private List<DataTagAttrOptionDTO> dataTagAttrOptionDTOList;

}
